package tedu.study.ooday01;

public class StudentTest {
    public static void main(String[] args) {
        //创建对象
        Student zs = new Student();
        //访问成员变量
        zs.name = "zhangsan";
        zs.age = 18;
        zs.address = "湖南";
        //调用方法
        zs.study();
        zs.sayHi();

        Student ls = new Student();
        ls.name = "lisi";
        ls.age = 22;
        ls.address = "上海";
        ls.study();
        ls.sayHi();

        //1)创建了一个Student对象
        //2)给成员变量赋默认值
        Student ww = new Student();
        //ww.name = "wangwu";
        //ww.age = 30;
        //ww.address = "天津";
        ww.study();
        ww.sayHi();

        /*不初始化，直接编译错误
        String a;
        System.out.println(a);
        */

    }
}
